<?php

namespace app\common\model;

use app\common\exception\BusinessException;

class UserVipTransfer extends Base
{
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    /**
     * addLog
     * @param $send_uid
     * @param $to_uid
     * @param $vid_content
     * @return void
     * @throws BusinessException
     */
    public function addLog($send_uid, $to_uid, $vid_content)
    {
        $data = [
            'send_uid' => $send_uid,
            'to_uid' => $to_uid,
            'send_vid' => json_encode($vid_content),
        ];
        $isAdd = $this->add_data($data);
        if(!$isAdd){
            throw new BusinessException('保存转让日志失败');
        }
    }
}